const { WeaTools } = ecCom;

/**
 * 获取代办列表
 */
const splitPageKey = (param) => {
  return WeaTools.callApi('/api/workflow/reqlist/splitPageKey', 'POST', param);
};

/**
 * 获取异构tab信息
 */
const getOfsTabData = () => {
  return WeaTools.callApi('/api/portal/FlowDataAction/getOfsTabData', 'GET');
};

/**
 * 获取异构列表信息
 */
const getOfsToDoList = (param) => {
  return WeaTools.callApi('/api/portal/FlowDataAction/getOfsToDoList', 'GET',param);
};

/**
 * 获取数据
 */
const datas = (param) => {
  return WeaTools.callApi('/api/ec/dev/table/datas', 'POST', param);
};

/**
 * 获取数量
 */
const counts = (param) => {
  return WeaTools.callApi('/api/ec/dev/table/counts', 'POST', param);
};

/**
 * 获取显示列
 */
const getShowCol = (param) => {
  return WeaTools.callApi('/api/ec/dev/table/showCol', 'GET', param);
};

/**
 * 设置显示列
 */
const setShowCol = (param) => {
  return WeaTools.callApi('/api/ec/dev/table/showCol', 'POST', param);
};

/**
 * 获取创建流程数据
 */
const wfinfo = (param) => {
  return WeaTools.callApi('/api/workflow/createreq/wfinfo', 'GET', param);
};

/**
 * 收藏、取消收藏流程
 */
const managewfcoll = (param) => {
  return WeaTools.callApi('/api/workflow/createreq/managewfcoll', 'GET', param);
};

/**
 * 获取代办列表
 */
const getDoingWorkflowRequestListFun = (param) => {
  return WeaTools.callApi('/api/workflow/paService/getDoingWorkflowRequestList', 'POST', param);
};



const API = {
  datas,
  counts,
  splitPageKey,
  getShowCol,
  setShowCol,
  wfinfo,
  managewfcoll,
  getOfsTabData,
  getOfsToDoList
}
ecodeSDK.exp(API);
